# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-xml-writer
_realname=XML-Writer
pkgver=0.625
pkgrel=3
pkgdesc="Perl extension for writing XML documents"
url="http://search.cpan.org/~josephw/XML-Writer-0.625/"
arch="noarch"
license="PerlArtistic"
depends="perl"
depends_dev=""
makedepends="perl-dev"
install=""
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/J/JO/JOSEPHW/$_realname-$pkgver.tar.gz"

builddir="$srcdir/$_realname-$pkgver"

build() {
	cd "$builddir"
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="30ad348e7f1423ce82dc0709e767d4ae384ad6e76f6444c8a12d97b1dc9c2b39e2c5bec43779bc35891942fa75f852cd26e8831dd6b5cfb9c72bc8512ca55923  XML-Writer-0.625.tar.gz"
